<div class="container-fluid charts-container">
    <div class="charts-search-container col-xs-9">
        <div ui-view>
        </div>
    </div>
    <div prevent-right-click  class="col-xs-3 charts-tree-container" ng-controller="adIndexTreeController">
        <div class="row charts-title">
            <i class="glyphicon glyphicon-stats"></i>
            <span>指标管理</span>
            <i ng-show="isTreeLoading" class="glyphicon glyphicon-refresh glyphicon-refresh-animate tree-refresh"></i>
        </div>
        <div class="row charts-tree">
            <treecontrol class="tree-custom"
                         tree-model="treeModels"
                         options="treeOptions"
                         selected-node="selected"
                         expanded-nodes="expandedFolders"
                         on-selection="itemSelected(node)">
                <span context-menu title="{{node.tooltip?node.tooltip:''}}"
                     data-target="menu-{{node.type}}-{{node.id}}" class="tree-node-item">
                    <span ng-switch="" on="node.type">
                         <span ng-switch-when="folder" class="glyphicon glyphicon-folder-open chart_node" aria-hidden="true"></span>
                         <span ng-switch-when="element" class="glyphicon glyphicon-stats chart_node" aria-hidden="true"></span>
                    </span>
                    <a class="tree-node-hover">{{node.name}}</a>
                </span>
                <div class="dropdown position-fixed" id="menu-{{node.type}}-{{node.id}}">
                    <ul class="dropdown-menu" role="menu" title="{{node.name}}">
                        <li ng-click="addChart($event,node)" ng-show="node.type == 'folder'" class="menuItem">
                            <span class="glyphicon glyphicon-stats"></span> 添加指标
                        </li>
                        <li ng-click="addFolder($event,node)" ng-show="node.type == 'folder'" class="menuItem">
                            <span class="glyphicon glyphicon-folder-close"></span> 添加文件夹
                        </li>
                        <li ng-click="updateFolder($event,node)" ng-show="node.type == 'folder'" class="menuItem">
                            <span class="glyphicon glyphicon-edit"></span> 修改文件夹
                        </li>
                        <li ng-click="removeFolder($event,node)" ng-show="node.type == 'folder'" class="menuItem">
                            <span class="glyphicon glyphicon-trash"></span> 移除文件夹
                        </li>

                        <li ng-click="updateChart($event,node)" ng-show="node.type == 'element'" class="menuItem">
                            <span class="glyphicon glyphicon-edit"></span> 修改指标
                        </li>
                        <li ng-click="removeChart($event,node)" ng-show="node.type == 'element'" class="menuItem">
                            <span class="glyphicon glyphicon-trash"></span> 移除指标
                        </li>
                    </ul>
                </div>
            </treecontrol>

        </div>
    </div>
</div>